package com.lanou.utp.controller;

import com.lanou.utp.entity.ResponseData;
import com.lanou.utp.service.ApprovalService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author MaQingYun
 */
@RestController
public class ApprovalController {

    @Resource
    private ApprovalService approvalService;

    @PostMapping("/approvals/unpass")
    public ResponseData getLeaveApprovalList(@RequestBody Map<String,Integer> map) {
        //TODO: 获取当前用户的MajorId
        long majorId = 1L;
        return this.approvalService.getLeaveApprovalList(majorId, map.get("page"));
    }


}
